<?php
/**
 * @version		$Id: default_items.php 20788 2011-02-20 05:54:44Z infograf768 $
 * @package		Joomla.Site
 * @subpackage	com_content
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
$count = count($this->items[$this->parent->id]);
?>
<div class="categories-list<?php echo $this->pageclass_sfx;?>">
<?php
if ($count > 0 && $this->maxLevelcat != 0) {
    $i=1;
    $j=1;
    foreach ($this->items[$this->parent->id] as $id => $item) { ?>
        <?php
        $style = " class='theme-default'";
        if($i!=1){
            $style = "style='display:none'";
        }
        $div_end = "</div>";
        if ($this->params->get('show_empty_categories_cat') || $item->numitems || count($item->getChildren())) {
            if(($i-1)/8 == 1 || $i==1){
            $div_begin = "<div id='architecs_cat_$j' $style>";
            $j++;
                echo $div_begin;
            }
            ?>
            <div class="architecs-cat">
                <?php if ($this->params->get('show_subcat_desc_cat') == 1) { ?>
                    <?php if ($item->description) { ?>
                    <div class="architecs-cat-sub-img shadow">
                    <?php echo JHtml::_('content.prepare', $item->description); ?>
                    </div>
                    <?php } ?>
                <?php } ?>
                <div class="architecs-cat-sub-text"><a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)); ?>">
                <?php echo $this->escape($item->title); ?></a>
                </div>
            </div>
            <?php 
            if($i / 8 == 1 || $count == $i){
                echo $div_end;
            }
            $i++;
            ?>
        <?php } ?>
    <?php     
    }
    ?>
    
    <?php
} 
?>
</div>
<div class="button-footer">
    <div class="nivo-controlNav" style='margin-right:-23px'>
<?php
$n = $j-1;
for($i=1;$i<$j;$i++){
    echo "<a rel='$i' id='nivo_controlNav_$i' onclick='return change_cat(\"architecs_cat\",\"nivo_controlNav\",$i,$n)' class='nivo-control ".($i==1? "active":"")."'>$i</a>";
}
?>
    </div>
</div>